package com.bto.solar.work.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bto.solar.work.config.MybatisOrderDesignDeviceTypeHandler;
import com.bto.solar.work.dto.order.DesignDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;

/**
 * <p>
 * 设计
 * </p>
 *
 * @author adrian
 * @since 2023-08-28
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel(value = "Design对象", description = "设计")
@TableName(autoResultMap = true)
public class  Design implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单ID")
    @TableId(value = "id", type = IdType.INPUT)
    private String id;

    @ApiModelProperty("订单ID")
    private String orderId;

    @ApiModelProperty("设计类型")
    private String designType;

    @ApiModelProperty("设计设备信息")
    @TableField(typeHandler = MybatisOrderDesignDeviceTypeHandler.class)
    private List<DesignDto.DesignDevice> designDevice;

    @ApiModelProperty("组件功率")
    private Integer modulePower;

    @ApiModelProperty("设计组件数量")
    private Integer moduleNumberDesign;


    @ApiModelProperty("设计安装容量(W)")
    private Integer installedCapacityDesign;

    @ApiModelProperty("安装最高点（房屋+光伏）")
    private BigDecimal installedHeight;

    @ApiModelProperty("结构图纸（图片或PDF）")
    private String structureChart;

    @ApiModelProperty("电气图（图片或PDF）")
    private String electricalDiagram;

    @ApiModelProperty("状态")
    private String state;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Timestamp updateTime;
}
